package scigest.core;

import org.apache.commons.configuration.ConfigurationException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


/**
 *
 * @author Feiyi Wang
 *
 */
public class CatalogGen {

	private static Logger logger = LoggerFactory.getLogger(CatalogGen.class);
	
	/**
	 * @param args
	 * @throws Exception
	 * @throws ConfigurationException
	 */
	public static void main(String[] args) throws Exception  {

		// create and configure beans
		ApplicationContext ctx =
		    new ClassPathXmlApplicationContext(new String[] {"scigest.xml"});
		
		logger.debug("Creating Publisher");
		
		CatalogPublisher publisher = ctx.getBean("publisher", CatalogPublisher.class);
		
		publisher.publishFileMap();
		
	}


}
